package cn.wolfcode.luowowo;


import cn.wolfcode.luowowo.domain.Destination;
import cn.wolfcode.luowowo.repository.DestinationRepository;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.client.RestTemplate;

import java.util.List;

@SpringBootTest
public class demo {
    @Value("${sms.url}")
    private String url;
    @Test
    public void testUrl(){
        System.out.println(url);
        RestTemplate restTemplate = new RestTemplate();
        //解析url,并填充占位符,发起请求
        String ref = restTemplate.getForObject("http://localhost/views/destination/index.html",
                String.class);
        //判断返回值有没Success表示是否成功

        System.out.println(ref);
    }

}
